define(function(require, exports, module) {
    "require:nomunge,exports:nomunge,module:nomunge";

    var app = require('mokit/app');
    var ProjectTypeView = require('../views/project-type');
    var commonUtils = require('../common/utils');
    var projectModel = require('../models/Project');

    /**
     * 社友录页面控制器
     */
    return app.controller.create({
        isSetting: true,

        /**
         * 默认action
         */
        index: function(context) {
            var self = this;
            //清空返回处理队列
			commonUtils.backAction = [];
            self.setView(new ProjectTypeView());
        },

        createProject: function(context, type) {
            var self = this;
            projectModel.createProject(type);
            self.go(context, '/project/new', '/project/type');
        }
    });

});